{% extends "user_base.html" %}
{% block title %}
诊断记录修改
{% endblock %}

{% block subtitle %}
诊断记录修改
{% endblock %}


{% block main %}诊断记录修改{% endblock %}

{% block content %}

<div class="card">
  <div class="card-body">
    <h5 class="card-title">诊断记录修改</h5>

    <!-- Default Tabs -->
    <ul class="nav nav-tabs" id="myTab" role="tablist">

      <li class="nav-item" role="presentation">
        <button class="nav-link active" id="contact-tab" data-bs-toggle="tab" data-bs-target="#contact" type="button"
          role="tab" aria-controls="contact" aria-selected="true">诊疗信息</button>
      </li>
    </ul>

    <!-- 个人基本信息 -->
    <div class="tab-content pt-2" id="myTabContent" >
      
        <!-- Vertical Form -->





      <!-- 诊疗 -->

      <div class="tab-pane fade show active" id="contact" role="tabpanel" aria-labelledby="contact-tab">
        <!-- Vertical Form -->
        <form class="row g-3" method="post" action="{% url 'UserApp:personal_add'%}" >
          {% csrf_token %}
          <div class="col-md-12">
            <label for="user_name" class="form-label">姓名</label>
            <input type="text" class="form-control" id="user_name" name="user_name"  value="{{v.user_name}}" disabled>
          </div>
          <input type="hidden" value="visit" name="type">
          <input type="hidden" name="id" value="{{p.vid}}">
          

          <div class="col-md-12">
            <label for="inputState" class="form-label">性别</label>
            <select id="user_sex" class="form-select" name="user_sex"  value="{{v.user_sex}}" disabled>
              {% if v.user_sex  == '男' %}
              <option selected>男</option>
              <option>女</option>
              {% else %}
              <option >男</option>
              <option selected>女</option>
              {% endif %}
            </select>
          </div>

          <div class="col-md-12">
            <label for="department" class="form-label">就诊科室</label>
            <input type="text" class="form-control" id="department" value={{v.department}} name="department">
          </div>

          <div class="col-md-12">
            <label for="chief_complaint" class="form-label">主诉</label>
            <input type="text" class="form-control" id="chief_complaint" value={{v.chief_complaint}} name="chief_complaint" placeholder="自己的症状或（和）体征、性质，以及持续时间等内容（精简）">
          </div>

          <div class="col-md-12">
            <label for="HPI" class="form-label">现病史</label>
            <input type="text" class="form-control" id="HPI" name="HPI"  value={{v.HPI}} placeholder="患者病后的全过程，即发生、发展、演变和诊治经过(详细)">
          </div>

          <div class="col-md-12">
            <label for="PH" class="form-label">既往史</label>
            <input type="text" class="form-control" id="PH" name="PH" value={{v.PH}} placeholder="患者既往的健康状况和过去曾经患过的疾病与这次问诊相关等方面的问题">
          </div>

          <div class="col-md-12">
            <label for="diagnose" class="form-label">诊断</label>
            <input type="text" class="form-control" id="diagnose" value={{v.diagnose}} name="diagnose" placeholder="医生的临床诊断结果">
          </div>

          <div class="col-md-12">
            <label for="prescription" class="form-label">处方药</label>
            <input type="text" class="form-control" id="prescription" value={{v.prescription}} name="prescription">
          </div>

          <div class="col-md-12">
            <label for="DA" class="form-label">医嘱</label>
            <input type="text" class="form-control" id="DA" value={{v.DA}} name="DA">
          </div>

          <div class="col-md-12">
            <label for="date" class="form-label">就诊日期</label>
            <input type="date" class="form-control" id="date" value={{v.date|date:"Y-m-d"}} name="date">
          </div>


          <div class="text-center">
            <button type="submit" class="btn btn-primary">提交</button>
            <button type="reset" class="btn btn-secondary">重置</button>
          </div>
        </form><!-- Vertical Form -->
      </div>
    </div><!-- End Default Tabs -->

  </div>
</div>


{% endblock %}